# coding=utf-8

import requests;
from lxml import etree;

baseurl = 'https://search.51job.com/list';

headers = {
            'authority': "list.tmall.hk'",
            'user-agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36',
            'referer': 'https://www.alibaba.com/',
            'cookie': 'cna=p/WrGQh8vz4CAXAFysxL3EUF; cnaui=43802804; aui=43802804; sca=387e7dd1; atpsida=c7eb5b5c028ef5f67a8bb369_1631524083_2"',
        }

def _get_job_info(cityCode, keyword):
    url = baseurl + '/{},000000,0000,00,9,99,{},2,1.html'.format(cityCode, keyword)
    req = requests.get('https://open-s.alibaba.com/openservice/galleryProductOfferResultViewService?appName=magellan&appKey=a5m1ismomeptugvfmkkjnwwqnwyrhpb1&staticParam=&SearchText=TV_Cart&IndexArea=product_en&page=5');
    # html = etree.HTML(req.text);
    # print(req.text);
    # return req[a - 9:a - 3];


# Press the green button in the gutter to run the script.
if __name__ == '__main__':
    _get_job_info("110300", "软件");

# See PyCharm help at https://www.jetbrains.com/help/pycharm/
